#include "DemoWidget.h"

#include <QGridLayout>

#pragma region Init
DemoWidget::DemoWidget(QWidget *pParent)
    : QWidget(pParent)
{
    QGridLayout *layout_ = new QGridLayout(this);
    layout_->setSpacing(0);
    layout_->setMargin(0);

    RSDriverParam param; ///< Create a parameter object
    param.input_type = InputType::ONLINE_LIDAR;
    param.input_param.msop_port = 6699;  ///< Set the lidar msop port number, the default is 6699
    param.input_param.difop_port = 7788; ///< Set the lidar difop port number, the default is 7788
    param.lidar_type = LidarType::RSM1;  ///< Set the lidar type. Make sure this type is correct

    LidarDriverX *driver = new LidarDriverX(this, param);
    layout_->addWidget(driver);
    driver->Start();
}

DemoWidget::~DemoWidget()
{
}
#pragma endregion